package com.neu;

import java.sql.DriverManager;
import java.sql.SQLException;

public class Connection {
    // 数据库连接信息
    private static final String URL = "jdbc:mysql://localhost:3306/flower_shop?useSSL=false&serverTimezone=UTC";
    private static final String USER = "root";
    private static final String PASSWORD = "123456";

    // 获取连接
    public static Connection getConnection() throws SQLException {
        return (Connection) DriverManager.getConnection(URL, USER, PASSWORD);
    }
}